import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_scan_crop/enum/Env.dart';
import 'package:image_scan_crop/page/MyApp.dart';
import 'package:image_scan_crop/provider/DataProvider.dart';
import 'package:image_scan_crop/utils/Config.dart';
import 'package:provider/provider.dart';

void main() {
  Config.env = Env.RELEASE;
  // Config.env = Env.DEV;
  // FlutterBugly.postCatchedException(() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(
    ChangeNotifierProvider(
      create: (context) => DataProvider(),
      child: const MyApp(),
    ),
  );

  // runApp(CropImageWidget());
  // }, debugUpload: true);
  // FlutterBugly.init(androidAppId: "1f405d01b1", iOSAppId: "681da3573e");

  if (Platform.isAndroid) {
    SystemUiOverlayStyle systemUiOverlayStyle =
        const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}
